package org.bim.view.drag.design.api.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.bim.view.drag.design.entity.TProjectShare;


@Getter
@Setter
public class TProjectShareVO extends TProjectShare {
    @ApiModelProperty("项目所有者名称")
    private String shareUserName;
    @ApiModelProperty("是否为项目所有者")
    private Boolean isOwner=false;

    public Integer getShareRole(){
        if(isOwner!=null&&isOwner){
            return 2;
        }
        return super.getShareRole();
    }
    public String getShareRoleName(){
        if(isOwner!=null&&isOwner){
            return "所有者";
        }
        return  getShareRole() ==1?"开发者":"查看者";
    }
}
